<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddCompanyToChannels extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('channels', function (Blueprint $table) {
            $table->string('logo', 255)->after('name');
            $table->string('phone', 20)->after('logo');
            $table->text('introduction')->after('type');
            $table->string('official_account', 30)->after('introduction');
            $table->string('official_account_qrcode', 255)->after('official_account');
            $table->string('web_url', 255)->after('official_account_qrcode');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('channels', function (Blueprint $table) {
            $table->dropColumn('logo');
            $table->dropColumn('phone');
            $table->dropColumn('introduction');
            $table->dropColumn('official_account');
            $table->dropColumn('official_account_qrcode');
            $table->dropColumn('web_url');
        });
    }
}
